import {
  request,
  METHOD
} from '@/utils/request'

const BASE_URL = process.env.VUE_APP_API_URL

// 通用枚举类
export async function getSelectOption (params) {
  var res = await request(`${BASE_URL}/sys/common/enum`, METHOD.GET, params)
  var formatData = []
  if (res.data && res.data.length > 0) {
    res.data.forEach(element => {
      formatData[element.type] = element.pairList
    })
  }
  res.formatData = formatData
  return res
}
